package com.bum.guru.dj.service;

import java.sql.SQLException;
import java.util.List;

import com.bum.guru.dj.bo.DjListBO;
import com.bum.guru.dj.dao.SongDAO;
import com.bum.guru.exp.dj.IDjGuruService;
import com.bum.guru.exp.dj.om.Song;

public class DjGuruService implements IDjGuruService {
	SongDAO	songDAO;
	DjListBO djListBO;

	@Override
	public List<Song> listSongs(int catId, long fromId, int maxResults) {
		try {
			return songDAO.list(catId, fromId, maxResults);
		} catch (SQLException e) {
		}

		return null;
	}

	@Override
	public Song get(long id) {
		try {
			return songDAO.get(id);
		} catch (Exception e) {
		}
		return null;
	}
	
	public List<Song> listTop(int viewId) {
		return djListBO.list(viewId);
	}

	/**
	 * SETTERS
	 */
	public void setSongDAO(SongDAO songDAO) {
		this.songDAO = songDAO;
	}

	public void setDjListBO(DjListBO djListBO) {
		this.djListBO = djListBO;
	}

}
